﻿namespace SqlSharp.Infrastructure;

public static class GlobalFunctions
{
    public static string CamelCase(string input)
    {
        var name = PascalCase(input);
        return char.ToLower(name[0]) + name[1..];
    }

    public static string PascalCase(string input)
    {
        var list = input.Split('_').Select(item => $"{char.ToUpper(item[0])}{item[1..].ToLower()}").ToList();
        return string.Join("", list);
    }
}